package com.gtw.modules.sys.service;

import com.gtw.modules.entity.TbActivityCommodity;

import java.util.List;
import java.util.Map;

/**
 * Created by wuye on 2018/3/2.
 */
public interface SysTbActivityCommodityService {

    TbActivityCommodity queryObject(Integer id);

    List<TbActivityCommodity> queryList(Map<String, Object> map);

    int queryTotal(Map<String, Object> map);

    void save(TbActivityCommodity activityCommodity);

    void update(TbActivityCommodity activityCommodity);

    void delete(Integer id);

    void deleteBatch(Integer[] ids);

    List<TbActivityCommodity> foundByActivityId(Integer id);

    TbActivityCommodity foundByActivityidCommodityid(Map<String,Object> map);

    /**
     * 减少活动库存
     * @param aid
     * @param commoditynumber
     */
    void subStore(Integer aid, Integer commoditynumber);

    /**
     * 增加活动库存
     * @param aid
     * @param commoditynumber
     */
    void addStore(Integer aid, Integer commoditynumber);
}
